<?php
namespace app\admin\validate;
use think\Validate;
class Category extends Validate{
    protected $rule =   [
        'parent_id'  => 'require',
        'category_name'   => 'require',
    ];

    protected $message  =   [
        'parent_id.require' => '请选择分类！！！',
        'category_name'     => '分类名称不能为空！！！',
    ];
}